package com.songlanyun.modules.message.model;

import com.songlanyun.common.drive.ValueObject;
import com.songlanyun.common.enums.GoodsConstant;
import com.songlanyun.common.enums.OrderConstant;
import lombok.Data;

import java.math.BigDecimal;
import java.util.List;

/**
 * 物流消息模型
 */
@Data
public class LogisticsMessage implements ValueObject, IMessageBody {

    public LogisticsMessage() {
    }

    public LogisticsMessage(OrderConstant.LogisticsStatus logisticsStatus, Long orderId,Long goodsPackageId, String logisticCode,
                            Boolean exchange,Integer goodsNum, BigDecimal money, BigDecimal totalPoint, List<GoodsMessage> goods) {
        this.logisticsStatus = logisticsStatus;
        this.orderId = orderId;
        this.goodsPackageId = goodsPackageId;
        this.logisticCode = logisticCode;
        this.exchange = exchange;
        this.goodsNum = goodsNum;
        this.money = money;
        this.totalPoint = totalPoint;
        this.goods = goods;

    }

    /**
     * 物流状态
     * 0：已发货
     * 1：已收货
     */
    private OrderConstant.LogisticsStatus logisticsStatus;

    /**
     * 订单id
     */
    private Long orderId;

    /**
     * 包裹ID
     */
    private Long goodsPackageId;

    /**
     * 物流单号
     */
    private String logisticCode;

    /**
     * 商品
     */
    private List<GoodsMessage> goods;

    /**
     * 商品数量
     */
    private Boolean exchange;

    /**
     * 商品数量
     */
    private Integer goodsNum;

    /**
     * 支付总金额
     */
    private BigDecimal money;

    /**
     * 总积分
     */
    private BigDecimal totalPoint;


//
//    /**
//     * 商品ID
//     */
//    private Long goodsId;
//
//    /**
//     * 商品名称
//     */
//    private String goodsName;
//
//    /**
//     * 商品名称
//     */
//    private String goodsImg;
//
//    /**
//     * 多个商品
//     *  "goods":[
//     *             {"goodsId":1,"goodsImg":"http://1.com"},
//     *             {"goodsId":2,"goodsImg":"http://2.com"}
//     *          ]
//     */
//    private List<Map<String, Object>> goods;
}
